Release 10.1A: OpenEdge Development:
Programming Interfaces
The SYSTEM-HELP statement
An OpenEdge application executes the Windows help engine (
hh.exeorWinhlp32.exe) using theSYSTEM-HELPstatement. Here is the syntax for theSYSTEM-HELPstatement:
file-stringThe
file-stringparameter is a character expression that specifies the pathname of a help file. If the file has a.chmextension (the extension for compiled Microsoft HTML Help files), the Microsoft HTML Help viewer is launched. If the file has a.hlpfile extension, the Microsoft Windows Help viewer is launched.WINDOW-NAMEwindow-nameThis option is supported in Windows Help (
.hlpfiles) only.The
window-nameparameter is a character expression that evaluates to the primary or secondary window name as defined in the [WINDOWS] section of the help project file. If the window name is omitted, or if “main” is specified, the primary help window is used.CONTENTSThis option is supported for backward compatibility only.
For HTML Help, this option displays the Microsoft HTML Help viewer with the default topic in the content pane. Use the
HELP-TOPICoption to specify the topic to display.In Windows Help, this option displays the help topic defined as the contents in the [OPTIONS] section of the help project file.
CONTEXTint-exprDisplays the help topic that the context number identifies. You define context numbers in the [MAP] section of the help project file.
The
int-exprparameter is the context number for the help topic.HELP-TOPICstringThis option is supported for HTML Help (
.chmfiles) only.Displays a help topic in the content pane of the Microsoft HTML Help viewer.
The
stringparameter is a character expression that indicates the topic (.htm/.htmlfile) within the compiled Microsoft HTML Help (.chm) file to display.KEYstringFor HTML Help, this option displays the topic matching the string found in the keyword index. Use semicolons in the
stringparameter to delimit multiple keywords. If no match is found, Microsoft HTML Help displays the help viewer with the Index tab on top.In Windows Help, this option displays the help topic matching the string found in the index keyword list. If there is more than one match, it displays the first topic containing the keyword. If there is no match or the string is omitted, a message is displayed indicating that the keyword is invalid. The
stringparameter is a character expression that evaluates to a keyword for the desired help topic.ALTERNATE-KEYstringThis option is supported for HTML Help (
.chmfiles) only. In Windows Help (.hlpfiles), see theMULTIPLE–KEYoption.Displays a help topic matching the
stringfound in the alternate keyword (Alink) index. Thestringparameter is a character expression that evaluates to a keyword in the alternate keyword index.POSITION XxYyWIDTHdxHEIGHTdyPositions an existing (already opened) help window as specified.
The
xparameter is an integer expression that specifies the x coordinate for the help window.The
yparameter is an integer expression that specifies the y coordinate for the help window.The
dxparameter is an integer expression that specifies the width of the help window.The
dyparameter is an integer expression that specifies the height of the help window.POSITION MAXIMIZEMaximizes an existing (already opened) help window.
QUITInforms the help application that help is no longer required. If no other applications are using help, the operating system closes the help application.
SET-CONTENTSint-exprThis option is supported in Windows Help (
.hlpfiles) only. This option is supported for backward compatibility only.Dynamically remaps the contents help topic from what is defined in the [OPTIONS] section of the help project file. When a
CONTENTScall is made, the new contents help topic is displayed.The
int-exprparameter is the context number for the new contents help topic.CONTEXT-POPUPint-exprThis option is supported in Windows Help (
.hlpfiles) only.Displays the help topic in a pop-up window that the context number identifies. You define context numbers in the [MAP] section of the help project file. If a nonscrolling region exists in a help topic, only that region displays when you use the
CONTEXT-POPUPoption to display the topic.The
int-exprparameter is the context number for the help topic.PARTIAL-KEYstringThis option is supported in Windows Help (
.hlpfiles) only.Displays the help topic matching the string found in the keyword list. In Windows, if there is more than one match, no match, or if the string is omitted, it displays the Help Topics: Window Help Topics dialog box with the Index tab on top.
The
stringparameter is a character expression that evaluates to a partial key for the desired help topic.MULTIPLE-KEYcharTEXTstringThis option is supported in Windows Help (
.hlpfiles) only. For HTML Help, see theALTERNATE-KEYoption.Displays the help topic matching a keyword from an alternate keyword table.
The
charparameter is a character expression that evaluates to the single character keyword table identifier for the required table.The
stringparameter is a character expression that evaluates to the keyword that is located in the keyword table.COMMANDstringThis option is supported in Windows Help (
.hlpfiles) only.Executes a help macro.
The
stringparameter is a character expression that evaluates to the help macro to execute.FINDERThis option is supported in Windows Help (
.hlpfiles) only.Displays the Help Topics: Windows Help Topics dialog box, which contains an Index tab, a Find tab, and optionally a Contents tab, with the most recently used tab displayed on top.
If a Contents tab file (
.cntfile) is present when you initially call the Help Topics: Windows Help dialog box, then the Contents tab displays on top. However, if a.cntfile is not present, then the dialog box displays with the Index tab on top; the Contents tab is not available.FORCE-FILEThis option is supported in Windows Help (
.hlpfiles) only.Ensures that the correct help file is open and displayed.
HELPThis option is supported in Windows Help (
.hlpfiles) only.Displays the contents of the Progress Help-on-Help file. In Windows,
HELPdisplays the Help Topics: Windows Help Topics dialog box.Coding the help calling interface
This section explains some
SYSTEM-HELPstatement calls that are commonly used in the help calling interfaces of OpenEdge applications. For more information on the Progress language elements described in the following sections, see OpenEdge Development: Progress 4GL Reference .You can run the sample procedure,
r-syshlpchm.p, to execute the help calls explained in this section. The source code exampler-syshlpchm.p, is in the library,prodoc.pl, in\Program Files\Progress\OpenEdge\src. Follow the directions in the Preface for extracting files from libraries.This procedure demonstrates several features of the
SYSTEM-HELPstatement with the Procedure Editor help file (editeng.chm). The user can select a button to demonstrate each of the followingSYSTEM-HELPoptions:
![]()
To run r-syshlpchm.p:
- Copy
editeng.chmfrom\Program Files\Progress\OpenEdge\prohelpto your OpenEdge working directory (by default,C:\OpenEdge\WRK).- Open
r-syshlpchm.pin the Procedure Editor.- Press F2 to run the file.
When you click the buttons on the sample interface,
r-syshlpchm.pcalls the Procedure Editor help file,editeng.chm.Here is the contents of
r-syshlpchm.p:
|
Copyright © 2005 Progress Software Corporation www.progress.com Voice: (781) 280-4000 Fax: (781) 280-4095 |